package net.qhzw.vip.qiyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.qhzw.vip.qiyu.entity.RepairMaint;
import net.qhzw.vip.qiyu.model.CarRentalRepairMaint;
import net.qhzw.vip.qiyu.model.CarRetreatMaintVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface RepairMaintMapper extends BaseMapper<RepairMaint> {


    /***
     * 根据退车申请表id查询 配件价格 名称
     * @param idList
     * @return
     */
    List<CarRetreatMaintVo> findByRetreatIds(@Param("idList") List<Long> idList);


    /***
     * 根据退车申请表ID查询配件价格
     * @param retreatIds
     * @return
     */
    List<RepairMaint> getRepairMaintByRetreatId(@Param("retreatIds") List<Long> retreatIds);


    /***
     * 根据换车申请id查询配件列表
     * @param id
     * @return
     */
    List<RepairMaint> listByTransferId(Long transferId);


    /***
     * 根据租车ID查询维修费
     * @param list
     * @return
     */
    List<CarRentalRepairMaint> listByCarRetreatIds(List<Long> list);


    /***
     * 根据退车id查询维修费
     * @param id
     * @return
     */
    BigDecimal getPriceByRetreatId(Long id);
}